package knapsackProblem;

import java.util.Set;

import almm.GeneralizedState;
import almm.State;

public class ProperState extends almm.ProperState
{
	protected ProperState(Set<State> currentState) {
		super( currentState);
	}

	public ProperState() {
		super();
	}

	@Override
	protected ProperState next(almm.ControlDecision u, almm.TimeInstant t) throws Exception {
		GeneralizedState s =  GeneralizedStateSet.getGeneralizedState(this, t);
		Set<State> currentState = super.getCurrentState();
		State stateToAdd = u.getDecision(s);
		currentState.add(stateToAdd);
		ProperState ps = new ProperState(currentState);
		return ps;		
	}
}